package com.woniu.humanresource.utils;

import com.woniu.humanresource.entity.Interviewer;
import com.woniu.humanresource.service.InterviewerService;

import javax.annotation.Resource;
import java.util.Timer;
import java.util.TimerTask;

public class AddInterviewerTimer {
    @Resource
    InterviewerService interviewerService;
    public void setTime(Interviewer interviewer){
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                interviewerService.updateInterviewer(interviewer);
            }
        }, 1000);
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("2222");
    }

}
